package com.ymatou.iapi.delivery.testcase;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.google.common.collect.Lists;
import com.ymatou.iapi.delivery.parameter.ImportDeliveryInfo;
import com.ymatou.iapi.delivery.parameter.ImportCheckReq;
import com.ymatou.iapi.delivery.parameter.enums.CheckBizResultEnum;
import com.ymatou.iapi.delivery.parameter.resp.ExpectCheckResult;
import com.ymatou.iapi.delivery.parameter.resp.ImportDeliveryCheckResp;
import com.ymatou.iapi.delivery.parameter.resp.ImportDeliveryCheckResult;
import com.ymatou.iapi.delivery.service.DeliveryService;
import com.ymatou.iapi.delivery.service.ImportCheckCall;
import com.ymatou.iapi.optrade.parameter.enums.AuthenticateFeeTypeEnum;
import com.ymatou.iapi.optrade.parameter.enums.AuthenticateFreightTypeEnum;
import com.ymatou.iapi.optrade.parameter.enums.LogisticsTypeEnum;
import com.ymatou.iapi.optrade.resp.TradingServiceResp;
import com.ymatou.iapi.synctrade.service.TradingSyncService;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;
import com.ymttest.business.service.AccountCallServiceV2;
import com.ymttest.business.service.YMTTrading.TradingCallService;
import com.ymttest.business.service.YMTTrading.TradingPlaceAuthenticateCallService;
import com.ymttest.business.service.YMTTrading.TradingPlaceOrderCallService;
import com.ymttest.utils.TestDataManager;
import com.ymttest.utils.YMTDateUtil;

/**
 * 校验物流单号接口接口 FreeMaker Template自动生成代码
 */
@TestSuite
public class Ts_ImportCheck {
	private static ImportCheckReq importCheckReq;
	private static ImportCheckCall importCheckCall;

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("导入检查-新");

		String accountid1;
		try {
			accountid1 = AccountCallServiceV2.getAccountId(20238699);
			AccountCallServiceV2.resetAccount(accountid1, new BigDecimal(
					9000000), new BigDecimal(0));
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	@Before
	public void caseUp() {
		importCheckReq = new ImportCheckReq();
		importCheckCall = new ImportCheckCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(importCheckCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	/**
	 * 
	 * @param expectCheckResultList
	 */
	private void verify(List<ExpectCheckResult> expectCheckResultList) {

		ImportDeliveryCheckResp resp = importCheckCall.getDeliveryCheckResp();

		List<ImportDeliveryCheckResult> billNoCheckResults = resp
				.getResults();

		int i = 0;

		for (ExpectCheckResult expectcheckResultInfo : expectCheckResultList) {

			ImportDeliveryCheckResult checkResult = billNoCheckResults.get(i);

			Logger.verifyEquals(expectcheckResultInfo.isBizSuccess(),
					checkResult.isBizSuccess(), "校验BizSuccess");

			Logger.verifyEquals(expectcheckResultInfo.isValidation(),
					checkResult.isValidation(), "校验validation");

			Logger.verifyEquals(expectcheckResultInfo.getBizCode(),
					checkResult.getBizCode(), "校验bizCode");

			Logger.verifyEquals(expectcheckResultInfo.getBizMsg(),
					checkResult.getBizMsg(), "校验bizMsg");
			
			for (int j = 0; j < expectcheckResultInfo.getImportDeliveryInfo()
					.getBillNos().size(); j++) {
				Logger.verifyEquals(expectcheckResultInfo
						.getImportDeliveryInfo().getBillNos().get(j),
						checkResult.getBillNos().get(j), "校验billNo");
			}

			Logger.verifyEquals(expectcheckResultInfo.getImportDeliveryInfo()
					.getOrderId(), checkResult.getOrderId(), "校验orderId");

			Logger.verifyEquals(expectcheckResultInfo.getExpressName(),
					checkResult.getExpressName(), "校验expressName");

			Logger.verifyEquals(expectcheckResultInfo.getImportDeliveryInfo()
					.getYmtExpressCode(), checkResult.getYmtExpressCode(),
					"校验ymtExpressCode");

			i++;

		}

	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_0030() {
		Logger.start(true, "第三方保税 发货订单 国际段发货，发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.BondedDelivery);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.orderJustChinaDelivery
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.orderJustChinaDelivery
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("EMS（国内）");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_0031() {
		Logger.start(true, "第三方保税 发货订单，国内段发货，发货校验成功");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.BondedDelivery);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_0032() {
		Logger.start(true, "第三方保税 发货订单,订单状态不是待发货状态 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.BondedDelivery);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			// TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.orderStatusNotShip
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.orderStatusNotShip
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_0033() {
		Logger.start(true, "第三方保税 发货订单,物流公司不匹配 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.BondedDelivery);
			
			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(5)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("Y013");
			dInfo.setYmtExpressCode("Y088");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.expressUnavailableError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.expressUnavailableError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("Y013");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_0034() {
		Logger.start(true, "第三方保税 发货订单,运单号格式不正确 发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.BondedDelivery);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(5)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

//								expectCheckResult
//										.setBizCode(CheckBizResultEnum.billNoRuleError
//												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRuleError
												.getMessage());
								
								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_0035() {
		Logger.start(true, "第三方保税 发货订单,当前发货时系统时间-运单签收时间大于10天 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService.placeOrder(
					LogisticsTypeEnum.BondedDelivery, 20227567, "sellerName");

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			DeliveryService.saveLogisticsInfo(dInfo.getBillNos().get(0),
					YMTDateUtil.getBeforeOrNextDay(-11, YMTDateUtil.YMDHMS));

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoExpire
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoExpire
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_0036() {
		Logger.start(true, "第三方保税 多个发货订单，同时使用同一 第三方保税发货运单号 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.BondedDelivery);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.BondedDelivery);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			long tradingId2 = placeOrderResp2.getTradingId();

			BigDecimal useAccountAmount2 = placeOrderResp2.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount2, tradingId2);

			TradingCallService.sellerAcceptOrder(sellerId, orderId2);

			TradingSyncService.getSyncResult(orderId2);

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);

			dInfo2.setBillNos(Lists.newArrayList(dInfo.getBillNos().get(0)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo, dInfo2));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_0037() {
		Logger.start(true, "第三方保税 发货订单,物流单号被海外发货物流已使用,发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.BondedDelivery);

			long orderId2 = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(
							LogisticsTypeEnum.BondedDelivery).getOrderList()
					.get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList((Lists.newArrayList(dInfo)));

			importCheckReq.setSellerId(sellerId);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY.getCode(), dInfo);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00381() {
		Logger.start(true, "第三方保税 使用顺丰国际发货传入手机号(不校验号码是否正确),发货校验成功");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService.placeOrder(
					LogisticsTypeEnum.BondedDelivery, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);
			Thread.sleep(3000);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(12)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y073");
			dInfo.setMobile(TestDataManager.getCommPhoneNum());

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00382() {
		Logger.start(true, "第三方保税 使用顺丰国际发货不传入手机号,发货校验成功");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService.placeOrder(
					LogisticsTypeEnum.BondedDelivery, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(12)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y073");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_0039() {
		Logger.start(true, "第三方保税 发货订单，鉴定包裹，发非鉴定包裹 发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticateAndLogisticsType(
							AuthenticateFreightTypeEnum.BUYER, BigDecimal.ONE,
							AuthenticateFeeTypeEnum.BUYER, BigDecimal.TEN, LogisticsTypeEnum.BondedDelivery);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(false);
			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.authenticateOrderMustHasAuthenticatePackage
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.authenticateOrderMustHasAuthenticatePackage
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_0040() {
		Logger.start(true, "进口贸易 国际段 发货订单,发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.China);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");
			
			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.orderJustChinaDelivery
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.orderJustChinaDelivery
												.getMessage());

								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_0041() {
		Logger.start(true, "进口贸易 发货订单,发货校验成功");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.China);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_0042() {
		Logger.start(true, "进口贸易 发货订单,订单状态不是待发货状态 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.China);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.orderStatusNotShip
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.orderStatusNotShip
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_0043() {
		Logger.start(true, "进口贸易 发货订单,物流公司不匹配 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.China);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("Y013");
			dInfo.setYmtExpressCode("Y088");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.expressUnavailableError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.expressUnavailableError
												.getMessage());
								
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("Y013");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_0044() {
		Logger.start(true, "进口贸易 发货订单,运单号格式不正确 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.China);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(12)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRuleError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRuleError
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_0045() {
		Logger.start(true, "进口贸易 发货订单,当前发货时系统时间-运单签收时间大于10天 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.China);
			
			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			DeliveryService.saveLogisticsInfo(dInfo.getBillNos().get(0),
					YMTDateUtil.getBeforeOrNextDay(-11, YMTDateUtil.YMDHMS));

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoExpire
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoExpire
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_0046() {
		Logger.start(true, "进口贸易 多种发货订单,跨物流使用同一发货运单号 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.China);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			TradingCallService.payOrder(userId, placeOrderResp2.getPayableAmount(), placeOrderResp2.getMainOrderId());

			TradingCallService.sellerAcceptOrder(sellerId, orderId2);

			TradingSyncService.getSyncResult(orderId2);

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);

			dInfo2.setBillNos(Lists.newArrayList(dInfo.getBillNos().get(0)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			importCheckReq
					.setDeliveryInfoList(Lists.newArrayList(dInfo, dInfo2));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true,
					"校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_0047() {
		Logger.start(true,
				"进口贸易 发货订单,非鉴定包裹，运单跨（收件人姓名+收件地址+买家id）使用 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.China);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);
			
			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService
					.placeOrderWithThreeProcutInTwoOrder(false,
							BigDecimal.ZERO, 30252346, LogisticsTypeEnum.China);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);
			dInfo2.setBillNos(Lists.newArrayList(dInfo.getBillNos().get(0)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);
			dInfo2.setAuthenticatePackage(false);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");
			
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.China.getCode(), dInfo2);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_0048() {
		Logger.start(true,
				"进口贸易 发货订单，非鉴定包裹，相同收件人姓名+相同收件地址+相同买家id 使用同一个运单号 超过1单 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.China);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);
			
			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.China);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);
			dInfo2.setBillNos(Lists.newArrayList(dInfo.getBillNos().get(0)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);
			dInfo2.setAuthenticatePackage(false);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");
			
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.China.getCode(), dInfo2);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00481() {
		Logger.start(true, "进口贸易 发货订单，鉴定包裹，运单跨（收件人姓名+收件地址+买家id）使用 发货校验通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticateAndLogisticsType(
							AuthenticateFreightTypeEnum.BUYER, BigDecimal.ONE,
							AuthenticateFeeTypeEnum.BUYER, BigDecimal.TEN, LogisticsTypeEnum.China);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(true);
			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);
			
			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService
					.placeOrderWithThreeProcutInTwoOrder(false,
							BigDecimal.ZERO, 30252346, LogisticsTypeEnum.China);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);
			dInfo2.setBillNos(Lists.newArrayList(dInfo.getBillNos().get(0)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);
			dInfo2.setAuthenticatePackage(true);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");
			
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.China.getCode(), dInfo2);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00482() {
		Logger.start(true,
				"进口贸易 发货订单，鉴定包裹，相同收件人姓名+相同收件地址+相同买家id 使用同一个运单号 超过1单 发货校验通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticateAndLogisticsType(
							AuthenticateFreightTypeEnum.BUYER, BigDecimal.ONE,
							AuthenticateFeeTypeEnum.BUYER, BigDecimal.TEN, LogisticsTypeEnum.China);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(true);
			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);
			
			TradingServiceResp placeOrderResp2 = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticateAndLogisticsType(
							AuthenticateFreightTypeEnum.BUYER, BigDecimal.ONE,
							AuthenticateFeeTypeEnum.BUYER, BigDecimal.TEN, LogisticsTypeEnum.China);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);
			dInfo2.setBillNos(Lists.newArrayList(dInfo.getBillNos().get(0)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);
			dInfo2.setAuthenticatePackage(true);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");
			
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.China.getCode(), dInfo2);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00483() {
		Logger.start(true,
				"进口贸易 发货订单，鉴定包裹，运单被非鉴别包裹使用, 发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticateAndLogisticsType(
							AuthenticateFreightTypeEnum.BUYER, BigDecimal.ONE,
							AuthenticateFeeTypeEnum.BUYER, BigDecimal.TEN, LogisticsTypeEnum.China);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(true);
			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);
			
			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.China);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);
			dInfo2.setBillNos(Lists.newArrayList(dInfo.getBillNos().get(0)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);
			dInfo2.setAuthenticatePackage(false);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");
			
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.China.getCode(), dInfo2);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00484() {
		Logger.start(true,
				"进口贸易 发货订单，鉴定包裹，使用该运单发货的鉴别包裹数量超过2单, 发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticateAndLogisticsType(
							AuthenticateFreightTypeEnum.BUYER, BigDecimal.ONE,
							AuthenticateFeeTypeEnum.BUYER, BigDecimal.TEN, LogisticsTypeEnum.China);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(true);
			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);
			
			TradingServiceResp placeOrderResp2 = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticateAndLogisticsType(
							AuthenticateFreightTypeEnum.BUYER, BigDecimal.ONE,
							AuthenticateFeeTypeEnum.BUYER, BigDecimal.TEN, LogisticsTypeEnum.China);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);
			dInfo2.setBillNos(Lists.newArrayList(dInfo.getBillNos().get(0)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);
			dInfo2.setAuthenticatePackage(true);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");
			
			TradingServiceResp placeOrderResp3 = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticateAndLogisticsType(
							AuthenticateFreightTypeEnum.BUYER, BigDecimal.ONE,
							AuthenticateFeeTypeEnum.BUYER, BigDecimal.TEN, LogisticsTypeEnum.China);

			long orderId3 = placeOrderResp3.getOrderList().get(0).getOrderId();

			ImportDeliveryInfo dInfo3 = new ImportDeliveryInfo();

			dInfo3.setOrderId(orderId3);
			dInfo3.setBillNos(Lists.newArrayList(dInfo.getBillNos().get(0)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo3.setDeliverySection(3);
			dInfo3.setDeliverySource(1);
			dInfo3.setAuthenticatePackage(true);

			dInfo3.setExpressName("sf");
			dInfo3.setYmtExpressCode("Y013");
			
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.China.getCode(), dInfo2);
			DeliveryService.saveDeliveryByReqAndInfo(orderId3, sellerId,
					LogisticsTypeEnum.China.getCode(), dInfo3);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00485() {
		Logger.start(true, "进口贸易 发货订单，鉴定包裹，发非鉴定包裹 发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticateAndLogisticsType(
							AuthenticateFreightTypeEnum.BUYER, BigDecimal.ONE,
							AuthenticateFeeTypeEnum.BUYER, BigDecimal.TEN, LogisticsTypeEnum.China);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(false);
			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.authenticateOrderMustHasAuthenticatePackage
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.authenticateOrderMustHasAuthenticatePackage
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00490() {
		Logger.start(true, "进口贸易 发货订单  使用顺丰发货传入手机号(不校验号码是否正确)，发货校验成功");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService.placeOrder(
					LogisticsTypeEnum.China, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(12)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y136");
			dInfo.setMobile(TestDataManager.getCommPhoneNum());

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00491() {
		Logger.start(true, "境外发货 国内段  使用新顺丰发货不传入手机号，校验成功");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService.placeOrder(
					LogisticsTypeEnum.China, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(12)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y136");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00511() {
		Logger.start(true, "境外发货 国际段 发货订单,第三方物流，发货校验成功");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("ems");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true,
					"校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("ems");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00512() {
		Logger.start(true, "境外发货 国际段 发货订单,第三方物流，订单状态不是国际段待发货状态 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.orderStatusNotShip
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.orderStatusNotShip
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false
										);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00513() {
		Logger.start(true, "境外发货 国际段 发货订单,第三方物流，物流公司不匹配 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(5)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("Y013");
			dInfo.setYmtExpressCode("Y088");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.expressUnavailableError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.expressUnavailableError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("Y013");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	// TODO
	public void Tc_ImportCheck_00514() {
		Logger.start(true, "境外发货 国际段 发货订单,第三方物流，运单号格式不正确 发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(1)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRuleError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRuleError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00515() {
		Logger.start(true, "境外发货 国际段 发货订单,第三方物流，当前发货时系统时间-运单签收时间大于10天 发货校验通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			DeliveryService.saveLogisticsInfo(dInfo.getBillNos().get(0),
					YMTDateUtil.getBeforeOrNextDay(-11, YMTDateUtil.YMDHMS));

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00516() {
		Logger.start(true,
				"境外发货 国际段 发货订单，第三方物流，运单被其他境外发货订单国内段使用， 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");
			
			// 第二个订单
			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			TradingSyncService.getSyncResult(orderId2);

			TradingCallService.payOrder(userId,
					placeOrderResp2.getPayableAmount(),
					placeOrderResp2.getTradingId());

			TradingCallService.sellerAcceptOrder(sellerId, orderId2);

			TradingSyncService.getSyncResult(orderId2);

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);

			dInfo2.setBillNos(Lists.newArrayList(dInfo.getBillNos().get(0)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo, dInfo2));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00517() {
		Logger.start(true,
				"境外发货 国际段 发货订单，第三方物流，运单被其他物流方式使用， 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");
			
			// 第二个订单
			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.China);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			TradingSyncService.getSyncResult(orderId2);

			TradingCallService.payOrder(userId,
					placeOrderResp2.getPayableAmount(),
					placeOrderResp2.getTradingId());

			TradingCallService.sellerAcceptOrder(sellerId, orderId2);

			TradingSyncService.getSyncResult(orderId2);

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);

			dInfo2.setBillNos(Lists.newArrayList(dInfo.getBillNos().get(0)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");
			
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 1,
					dInfo2);

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00518() {
		Logger.start(true, "境外发货 国际段 发货订单,第三方物流，该运单发货的国际段订单超过X单,发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(
							LogisticsTypeEnum.OVERSEAS_DELIVERY).getOrderList()
					.get(0).getOrderId();

			long orderId3 = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(
							LogisticsTypeEnum.OVERSEAS_DELIVERY).getOrderList()
					.get(0).getOrderId();

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId, 10,
					dInfo);
			DeliveryService.saveDeliveryByReqAndInfo(orderId3, sellerId, 10,
					dInfo);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_005191() {
		Logger.start(true, "境外发货 国际段  使用顺丰国际发货传入手机号(不校验号码是否正确),发货校验成功");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(12)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y136");
			dInfo.setMobile(TestDataManager.getCommPhoneNum());

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_005192() {
		Logger.start(true, "境外发货 国际段  使用顺丰国际发货不传入手机号,发货校验失败");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(12)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y136");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.expressCompanyNeedMobile
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.expressCompanyNeedMobile
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_005201() {
		Logger.start(true, "境外发货 国际段  使用贝海物流发货，非鉴定包裹,发货校验成功");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			// 暂时使用，需要找贝海要一个最新可用的运单号
			dInfo.setBillNos(Lists.newArrayList("DB2555011965US"));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(false);

			dInfo.setExpressName("贝海");
			dInfo.setYmtExpressCode("Y068");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);
			
			DeliveryService.deleteDeliverByBillNo(dInfo.getBillNos().get(0));

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("贝海");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_005202() {
		Logger.start(true, "境外发货 国际段  使用贝海物流发货，非鉴定包裹,运单在多个（收件人姓名+收件地址+买家id）使用，发货校验");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOfficialLogisticsOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();
			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();
			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			// 暂时使用，需要找贝海要一个最新可用的运单号
			dInfo.setBillNos(Lists.newArrayList("DB2555011965US"));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(false);

			dInfo.setExpressName("贝海");
			dInfo.setYmtExpressCode("Y068");
			
			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService
					.placeOrderWithThreeProcutInTwoOrder(false,
							BigDecimal.ZERO, 30252346, LogisticsTypeEnum.China);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);

			// 暂时使用，需要找贝海要一个最新可用的运单号
			dInfo2.setBillNos(Lists.newArrayList("DB2555011965US"));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(1);
			dInfo2.setDeliverySource(1);
			dInfo2.setAuthenticatePackage(false);

			dInfo2.setExpressName("贝海");
			dInfo2.setYmtExpressCode("Y068");
			
			DeliveryService.deleteDeliverByBillNo(dInfo.getBillNos().get(0));
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY.getCode(), dInfo2);

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("贝海");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_005203() {
		Logger.start(true, "境外发货 国际段  使用贝海物流发货，非鉴定包裹,“相同收件人姓名+相同收件地址+相同买家id”下使用该运单发货的订单数量超过1单(小于等于1)，发货校验失败");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOfficialLogisticsOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			// 暂时使用，需要找贝海要一个最新可用的运单号
			dInfo.setBillNos(Lists.newArrayList("DB2555011965US"));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(false);

			dInfo.setExpressName("贝海");
			dInfo.setYmtExpressCode("Y068");
			
			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, sellerName);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			long userId2 = placeOrderResp2.getUserId();

			TradingCallService.payOrder(userId2, placeOrderResp2.getPayableAmount(), placeOrderResp2.getTradingId());

			TradingCallService.sellerAcceptOrder(sellerId, orderId2);

			TradingSyncService.getSyncResult(orderId2);

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);

			// 暂时使用
			dInfo2.setBillNos(Lists.newArrayList("DB2555011965US"));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(1);
			dInfo2.setDeliverySource(1);
			dInfo2.setAuthenticatePackage(false);

			dInfo2.setExpressName("贝海");
			dInfo2.setYmtExpressCode("Y068");
			
			DeliveryService.deleteDeliverByBillNo(dInfo.getBillNos().get(0));
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY.getCode(), dInfo2);

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("贝海");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_005204() {
		Logger.start(true, "境外发货 国际段  使用贝海物流发货，鉴定包裹，发货校验成功");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticateAndOfficialLogistics(AuthenticateFreightTypeEnum.BUYER,
							BigDecimal.ONE, AuthenticateFeeTypeEnum.BUYER,
							BigDecimal.TEN);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();
			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();
			long userId = placeOrderResp.getUserId();
			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			// 暂时使用
			dInfo.setBillNos(Lists.newArrayList("DB2555011965US"));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(true);

			dInfo.setExpressName("贝海");
			dInfo.setYmtExpressCode("Y068");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);
			
			DeliveryService.deleteDeliverByBillNo(dInfo.getBillNos().get(0));

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("贝海");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_005205() {
		Logger.start(true, "境外发货 国际段  使用贝海物流发货，鉴定包裹,运单在多个（收件人姓名+收件地址+买家id）使用，发货校验成功");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticateAndOfficialLogistics(AuthenticateFreightTypeEnum.BUYER,
							BigDecimal.ONE, AuthenticateFeeTypeEnum.BUYER,
							BigDecimal.TEN);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();
			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();
			long userId = placeOrderResp.getUserId();
			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			// 暂时使用，需要找贝海要一个最新可用的运单号
			dInfo.setBillNos(Lists.newArrayList("DB2555011965US"));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(true);

			dInfo.setExpressName("贝海");
			dInfo.setYmtExpressCode("Y068");
			
			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService
					.placeOrderWithThreeProcutInTwoOrder(false,
							BigDecimal.ZERO, 30252346, LogisticsTypeEnum.China);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);

			// 暂时使用，需要找贝海要一个最新可用的运单号
			dInfo2.setBillNos(Lists.newArrayList("DB2555011965US"));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(1);
			dInfo2.setDeliverySource(1);
			dInfo2.setAuthenticatePackage(true);

			dInfo2.setExpressName("贝海");
			dInfo2.setYmtExpressCode("Y068");
			
			DeliveryService.deleteDeliverByBillNo(dInfo.getBillNos().get(0));
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY.getCode(), dInfo2);
			
			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult
										.setExpressName("贝海");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_005206() {
		Logger.start(true, "境外发货 国际段  使用贝海物流发货，鉴定包裹,“相同收件人姓名+相同收件地址+相同买家id”下使用该运单发货的订单数量超过1单(小于等于1)，发货校验成功");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticateAndOfficialLogistics(AuthenticateFreightTypeEnum.BUYER,
							BigDecimal.ONE, AuthenticateFeeTypeEnum.BUYER,
							BigDecimal.TEN);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();
			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();
			long userId = placeOrderResp.getUserId();
			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			// 暂时使用，需要找贝海要一个最新可用的运单号
			dInfo.setBillNos(Lists.newArrayList("DB2555011965US"));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(true);

			dInfo.setExpressName("贝海");
			dInfo.setYmtExpressCode("Y068");
			
			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, "sellerName");

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			long userId2 = placeOrderResp2.getUserId();

			TradingCallService.payOrder(userId2, placeOrderResp2.getPayableAmount(), placeOrderResp2.getTradingId());

			TradingCallService.sellerAcceptOrder(sellerId, orderId2);

			TradingSyncService.getSyncResult(orderId2);

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);

			// 暂时使用
			dInfo2.setBillNos(Lists.newArrayList("DB2555011965US"));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(1);
			dInfo2.setDeliverySource(1);
			dInfo2.setAuthenticatePackage(true);

			dInfo2.setExpressName("贝海");
			dInfo2.setYmtExpressCode("Y068");
			
			DeliveryService.deleteDeliverByBillNo(dInfo.getBillNos().get(0));
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY.getCode(), dInfo2);

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult
										.setExpressName("贝海");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_005207() {
		Logger.start(true, "境外发货 国际段  使用贝海物流发货，鉴定包裹，运单被非鉴别包裹使用，发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticateAndOfficialLogistics(AuthenticateFreightTypeEnum.BUYER,
							BigDecimal.ONE, AuthenticateFeeTypeEnum.BUYER,
							BigDecimal.TEN);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();
			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();
			long userId = placeOrderResp.getUserId();
			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			// 暂时使用，需要找贝海要一个最新可用的运单号
			dInfo.setBillNos(Lists.newArrayList("DB2555011965US"));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(true);

			dInfo.setExpressName("贝海");
			dInfo.setYmtExpressCode("Y068");
			
			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, "sellerName");

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			long userId2 = placeOrderResp2.getUserId();

			TradingCallService.payOrder(userId2, placeOrderResp2.getPayableAmount(), placeOrderResp2.getTradingId());

			TradingCallService.sellerAcceptOrder(sellerId, orderId2);

			TradingSyncService.getSyncResult(orderId2);

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);

			// 暂时使用
			dInfo2.setBillNos(Lists.newArrayList("DB2555011965US"));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(1);
			dInfo2.setDeliverySource(1);
			dInfo2.setAuthenticatePackage(false);

			dInfo2.setExpressName("贝海");
			dInfo2.setYmtExpressCode("Y068");
			
			DeliveryService.deleteDeliverByBillNo(dInfo.getBillNos().get(0));
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY.getCode(), dInfo2);

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult
										.setExpressName("贝海");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_005208() {
		Logger.start(true, "境外发货 国际段  使用贝海物流发货，鉴定包裹，使用该运单发货的鉴别包裹数量未超过2单，发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticateAndOfficialLogistics(AuthenticateFreightTypeEnum.BUYER,
							BigDecimal.ONE, AuthenticateFeeTypeEnum.BUYER,
							BigDecimal.TEN);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();
			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();
			long userId = placeOrderResp.getUserId();
			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			// 暂时使用，需要找贝海要一个最新可用的运单号
			dInfo.setBillNos(Lists.newArrayList("DB2555011965US"));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(true);

			dInfo.setExpressName("贝海");
			dInfo.setYmtExpressCode("Y068");
			
			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, "sellerName");

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			long userId2 = placeOrderResp2.getUserId();

			TradingCallService.payOrder(userId2, placeOrderResp2.getPayableAmount(), placeOrderResp2.getTradingId());

			TradingCallService.sellerAcceptOrder(sellerId, orderId2);

			TradingSyncService.getSyncResult(orderId2);

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);

			// 暂时使用
			dInfo2.setBillNos(Lists.newArrayList("DB2555011965US"));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(1);
			dInfo2.setDeliverySource(1);
			dInfo2.setAuthenticatePackage(true);

			dInfo2.setExpressName("贝海");
			dInfo2.setYmtExpressCode("Y068");
			
			TradingServiceResp placeOrderResp3 = TradingPlaceOrderCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, "sellerName");

			long orderId3 = placeOrderResp3.getOrderList().get(0).getOrderId();

			long userId3 = placeOrderResp3.getUserId();

			TradingCallService.payOrder(userId3, placeOrderResp3.getPayableAmount(), placeOrderResp3.getTradingId());

			TradingCallService.sellerAcceptOrder(sellerId, orderId3);

			TradingSyncService.getSyncResult(orderId2);

			ImportDeliveryInfo dInfo3 = new ImportDeliveryInfo();

			dInfo3.setOrderId(orderId3);

			// 暂时使用
			dInfo3.setBillNos(Lists.newArrayList("DB2555011965US"));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo3.setDeliverySection(1);
			dInfo3.setDeliverySource(1);
			dInfo3.setAuthenticatePackage(true);

			dInfo3.setExpressName("贝海");
			dInfo3.setYmtExpressCode("Y068");
			
			DeliveryService.deleteDeliverByBillNo(dInfo.getBillNos().get(0));
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY.getCode(), dInfo2);
			DeliveryService.saveDeliveryByReqAndInfo(orderId3, sellerId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY.getCode(), dInfo3);

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult
										.setExpressName("贝海");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_005209() {
		Logger.start(true, "境外发货 国际段  使用贝海物流发货，非鉴定包裹，当前发货时系统时间-运单生成时间<=10天，发货校验失败");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();
			long userId = placeOrderResp.getUserId();
			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			// 暂时使用，需要找贝海要一个最新可用的运单号
			dInfo.setBillNos(Lists.newArrayList("DB2555011965US"));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(false);

			dInfo.setExpressName("贝海");
			dInfo.setYmtExpressCode("Y068");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);
			
			DeliveryService.saveLogisticsInfo(dInfo.getBillNos().get(0),
					YMTDateUtil.getBeforeOrNextDay(-11, YMTDateUtil.YMDHMS));

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult
										.setExpressName("贝海");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_005210() {
		Logger.start(true, "境外发货 国际段  使用贝海物流发货，鉴定包裹，当前发货时系统时间-运单生成时间<=10天，发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticateAndOfficialLogistics(AuthenticateFreightTypeEnum.BUYER,
							BigDecimal.ONE, AuthenticateFeeTypeEnum.BUYER,
							BigDecimal.TEN);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();
			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();
			long userId = placeOrderResp.getUserId();
			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			// 暂时使用，需要找贝海要一个最新可用的运单号
			dInfo.setBillNos(Lists.newArrayList("DB2555011965US"));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(true);

			dInfo.setExpressName("贝海");
			dInfo.setYmtExpressCode("Y068");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);
			
			DeliveryService.saveLogisticsInfo(dInfo.getBillNos().get(0),
					YMTDateUtil.getBeforeOrNextDay(-11, YMTDateUtil.YMDHMS));

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult
										.setExpressName("贝海");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00531() {
		Logger.start(true, "境外发货 国内段 发货订单,发货校验成功");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			// 境外发货 国际段发货
			TradingCallService.delivery(sellerId, orderId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY, 1);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00532() {
		Logger.start(true, "境外发货 国内段 发货订单,订单状态不是国内段待发货状态 发货校验通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00533() {
		Logger.start(true, "境外发货 国内段 发货订单,物流公司不匹配 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(5)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("Y013");
			dInfo.setYmtExpressCode("Y088");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.expressUnavailableError
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.expressUnavailableError
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("Y013");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00535() {
		Logger.start(true, "境外发货 国内段 发货订单,当前发货时系统时间-运单签收时间大于10天 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			// dInfo.setRealDeliveryArea(realDeliveryArea);

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			DeliveryService.saveLogisticsInfo(dInfo.getBillNos().get(0),
					YMTDateUtil.getBeforeOrNextDay(-11, YMTDateUtil.YMDHMS));

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoExpire
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoExpire
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00536() {
		Logger.start(true,
				"境外发货 国内段 发货订单，同时使用同一境外发货 国际段运单号 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			// 拼邮 国际段发货
			String billNo = TradingCallService.delivery(sellerId, orderId, LogisticsTypeEnum.OVERSEAS_DELIVERY, 1);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(billNo));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);
			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00537() {
		Logger.start(true, "境外发货 国内段 发货订单，非鉴定包裹，运单跨（收件人姓名+收件地址+买家id）使用 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);
			
			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService
					.placeOrderWithThreeProcutInTwoOrder(false,
							BigDecimal.ZERO, 30252346, LogisticsTypeEnum.China);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);
			dInfo2.setBillNos(dInfo.getBillNos());

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);
			dInfo2.setAuthenticatePackage(false);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");
			
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY.getCode(), dInfo2);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00538() {
		Logger.start(true,
				"境外发货 国内段 发货订单，非鉴定包裹，相同收件人姓名+相同收件地址+相同买家id 使用同一个运单号 超过1单 发货校验不通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);
			
			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);
			dInfo2.setBillNos(dInfo.getBillNos());

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);
			dInfo2.setAuthenticatePackage(false);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");
			
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY.getCode(), dInfo2);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_005381() {
		Logger.start(true, "境外发货 国内段 发货订单，鉴定包裹，发非鉴定包裹 发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticateAndLogisticsType(
							AuthenticateFreightTypeEnum.BUYER, BigDecimal.ONE,
							AuthenticateFeeTypeEnum.BUYER, BigDecimal.TEN, LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(false);
			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.authenticateOrderMustHasAuthenticatePackage
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.authenticateOrderMustHasAuthenticatePackage
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_005391() {
		Logger.start(true, "境外发货 国内段  使用顺丰发货传入手机号(不校验号码是否正确)，发货校验成功");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(12)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y136");
			dInfo.setMobile(TestDataManager.getCommPhoneNum());
			
			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_005392() {
		Logger.start(true, "境外发货 国内段  使用新顺丰发货不传入手机号，校验失败");
		try {

			long sellerId = 3383;
			String sellerName = "wesper";
			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService.placeOrder(
					LogisticsTypeEnum.OVERSEAS_DELIVERY, sellerId, sellerName);

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(12)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y136");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00540() {
		Logger.start(true, "境外发货 国内段 发货订单，鉴定包裹，运单跨（收件人姓名+收件地址+买家id）使用 发货校验通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticate(
							AuthenticateFreightTypeEnum.BUYER, BigDecimal.ONE,
							AuthenticateFeeTypeEnum.BUYER, BigDecimal.TEN);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(true);
			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);
			
			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService
					.placeOrderWithThreeProcutInTwoOrder(false,
							BigDecimal.ZERO, 30252346, LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);
			dInfo2.setBillNos(dInfo.getBillNos());

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);
			dInfo2.setAuthenticatePackage(true);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");
			
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY.getCode(), dInfo2);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00541() {
		Logger.start(true,
				"境外发货 国内段 发货订单，鉴定包裹，相同收件人姓名+相同收件地址+相同买家id 使用同一个运单号 超过1单 发货校验通过");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticate(
							AuthenticateFreightTypeEnum.BUYER, BigDecimal.ONE,
							AuthenticateFeeTypeEnum.BUYER, BigDecimal.TEN);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(true);
			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);
			
			TradingServiceResp placeOrderResp2 = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticate(
							AuthenticateFreightTypeEnum.BUYER, BigDecimal.ONE,
							AuthenticateFeeTypeEnum.BUYER, BigDecimal.TEN);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);
			dInfo2.setBillNos(dInfo.getBillNos());

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);
			dInfo2.setAuthenticatePackage(true);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");
			
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY.getCode(), dInfo2);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00542() {
		Logger.start(true,
				"境外发货 国内段 发货订单，鉴定包裹，运单被非鉴别包裹使用, 发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticate(
							AuthenticateFreightTypeEnum.BUYER, BigDecimal.ONE,
							AuthenticateFeeTypeEnum.BUYER, BigDecimal.TEN);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(true);
			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);
			
			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);
			dInfo2.setBillNos(dInfo.getBillNos());

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);
			dInfo2.setAuthenticatePackage(false);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");
			
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY.getCode(), dInfo2);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00543() {
		Logger.start(true,
				"境外发货 国内段 发货订单，鉴定包裹，使用该运单发货的鉴别包裹数量超过2单, 发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticate(
							AuthenticateFreightTypeEnum.BUYER, BigDecimal.ONE,
							AuthenticateFeeTypeEnum.BUYER, BigDecimal.TEN);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(true);
			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);
			
			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);
			dInfo2.setBillNos(dInfo.getBillNos());

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);
			dInfo2.setAuthenticatePackage(true);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");
			
			TradingServiceResp placeOrderResp3 = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId3 = placeOrderResp3.getOrderList().get(0).getOrderId();

			ImportDeliveryInfo dInfo3 = new ImportDeliveryInfo();

			dInfo3.setOrderId(orderId3);
			dInfo3.setBillNos(dInfo.getBillNos());

			// 发货节点、1国际段,2转运段,3国内段
			dInfo3.setDeliverySection(3);
			dInfo3.setDeliverySource(1);
			dInfo3.setAuthenticatePackage(true);

			dInfo3.setExpressName("sf");
			dInfo3.setYmtExpressCode("Y013");
			
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY.getCode(), dInfo2);
			DeliveryService.saveDeliveryByReqAndInfo(orderId3, sellerId,
					LogisticsTypeEnum.OVERSEAS_DELIVERY.getCode(), dInfo3);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00544() {
		Logger.start(true,
				"境外发货 国际段 发货订单，官方物流，使用第三方发货, 发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOfficialLogisticsOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY, 3383, "sellerName");

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(1);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(false);
			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.xloboDelivery
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.xloboDelivery
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00545() {
		Logger.start(true,
				"境外发货 国内段 发货订单，官方物流，使用第三方发货, 发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOfficialLogisticsOrder(LogisticsTypeEnum.OVERSEAS_DELIVERY, 3383, "sellerName");

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(false);
			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.xloboDelivery
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.xloboDelivery
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00546() {
		Logger.start(true,
				"境外发货 国内段 发货订单，运单跨买手使用, 发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(false);
			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);
			
			TradingServiceResp placeOrderResp2 = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long orderId2 = placeOrderResp2.getOrderList().get(0).getOrderId();
			long sellerId2 = placeOrderResp2.getOrderList().get(0).getSellerId();

			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId2);
			dInfo2.setBillNos(dInfo.getBillNos());

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);
			dInfo2.setAuthenticatePackage(false);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y013");
			
			DeliveryService.saveDeliveryByReqAndInfo(orderId2, sellerId2,
					LogisticsTypeEnum.OVERSEAS_DELIVERY.getCode(), dInfo2);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoRepeat
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoRepeat
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00547() {
		Logger.start(true,
				"境外发货 国内段 发货订单，订单没有鉴别商品，使用鉴别包裹，使用第三方发货, 发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(13)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(true);
			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.orderNotContainAuthenticateProduct
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.orderNotContainAuthenticateProduct
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00548() {
		Logger.start(true,
				"境外发货 国内段 发货订单，使用第三方发货, 不输入运单号，发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.OVERSEAS_DELIVERY);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(""));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(false);
			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.billNoNotExists
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.billNoNotExists
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00549() {
		Logger.start(true,
				"境外发货 国内段 发货订单，使用虚拟发货, 输入运单号，发货校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceOrderCallService
					.placeOrderWithLogisticsType(LogisticsTypeEnum.AutoDelivery);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList("12341245"));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);
			dInfo.setAuthenticatePackage(false);
			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y013");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.virtualOrderDontNeedBillNo
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.virtualOrderDontNeedBillNo
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(false);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({ P1.class })
	@TestCase
	public void Tc_ImportCheck_00601() {
		Logger.start(true,
				"境外发货 国内段 鉴别订单，发送一个鉴别包裹，两个非鉴别包裹校验失败");
		try {

			TradingServiceResp placeOrderResp = TradingPlaceAuthenticateCallService
					.placeOrderWithAuthenticate(AuthenticateFreightTypeEnum.BUYER,
							BigDecimal.ONE, AuthenticateFeeTypeEnum.BUYER,
							BigDecimal.TEN);

			long sellerId = placeOrderResp.getOrderList().get(0).getSellerId();

			long orderId = placeOrderResp.getOrderList().get(0).getOrderId();

			long userId = placeOrderResp.getUserId();

			long tradingId = placeOrderResp.getTradingId();

			BigDecimal useAccountAmount = placeOrderResp.getPayableAmount();

			TradingCallService.payOrder(userId, useAccountAmount, tradingId);

			TradingCallService.sellerAcceptOrder(sellerId, orderId);

			TradingSyncService.getSyncResult(orderId);

			ImportDeliveryInfo dInfo = new ImportDeliveryInfo();

			dInfo.setOrderId(orderId);

			dInfo.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(18)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo.setDeliverySection(3);
			dInfo.setDeliverySource(1);

			dInfo.setExpressName("sf");
			dInfo.setYmtExpressCode("Y037");

			// dInfo.setRealDeliveryArea(realDeliveryArea);
			
			ImportDeliveryInfo dInfo2 = new ImportDeliveryInfo();

			dInfo2.setOrderId(orderId);

			dInfo2.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(18)));

			// 发货节点、1国际段,2转运段,3国内段
			dInfo2.setDeliverySection(3);
			dInfo2.setDeliverySource(1);

			dInfo2.setExpressName("sf");
			dInfo2.setYmtExpressCode("Y037");
			dInfo2.setAuthenticatePackage(true);
			
			ImportDeliveryInfo dInfo3 = new ImportDeliveryInfo();

			dInfo3.setOrderId(orderId);

			dInfo3.setBillNos(Lists.newArrayList(TestDataManager.getRandomNum(18)));
						
			// 发货节点、1国际段,2转运段,3国内段
			dInfo3.setDeliverySection(3);
			dInfo3.setDeliverySource(1);

			dInfo3.setExpressName("sf");
			dInfo3.setYmtExpressCode("Y037");

			importCheckReq.setDeliveryInfoList(Lists.newArrayList(dInfo, dInfo2, dInfo3));

			importCheckReq.setSellerId(sellerId);

			importCheckCall.setData(importCheckReq);
			importCheckCall.callService();

			Logger.verifyEquals(importCheckCall.getSuccess(), true, "校验IsSuccess");

			List<ExpectCheckResult> list = new ArrayList<ExpectCheckResult>();

			importCheckReq
					.getDeliveryInfoList()
					.forEach(
							item -> {

								ExpectCheckResult expectCheckResult = new ExpectCheckResult(
										item);

								expectCheckResult
										.setBizCode(CheckBizResultEnum.passed
												.getCode());
								expectCheckResult
										.setBizMsg(CheckBizResultEnum.passed
												.getMessage());

								expectCheckResult.setBizSuccess(false);
								expectCheckResult.setValidation(true);
								expectCheckResult.setExpressName("sf");

								list.add(expectCheckResult);

							});

			list.get(0).setBizCode(CheckBizResultEnum.authenticateOrderNormalPackage.getCode());
			list.get(0).setBizMsg(CheckBizResultEnum.authenticateOrderNormalPackage.getMessage());
			list.get(0).setBizSuccess(false);
			list.get(0).setValidation(false);
			
			list.get(2).setBizCode(CheckBizResultEnum.authenticateOrderNormalPackage.getCode());
			list.get(2).setBizMsg(CheckBizResultEnum.authenticateOrderNormalPackage.getMessage());
			list.get(2).setBizSuccess(false);
			list.get(2).setValidation(false);
			
			verify(list);

		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}